<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>数据导入管理</title>
	<script>document.write('<script src="../../plugin/vue/js/import.js?' + Math.random() + '"><' + '/script>');</script>
    <script>_import("../../plugin/vue/js/before.js");</script>
</head>
<body>
	<div id="app" class="container" v-cloak>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="el-icon-document mr5"></i>数据导入</h3>
            </div>
            <div class="panel-body">
                <!-- search -->      
                <el-card class="box-card mb10 w-boxcard" shadow="never">
                  <div id="header" slot="header" class="clearfix">
                    <span class="f16 lh38">查询条件</span>   
                    <el-button class="pull-right" type="primary" @Click="template">下载模版</el-button> 
                    <el-button class="pull-right" style="margin-right: 10px;" type="primary" @Click="search">查询</el-button>                
                  </div>                                    
                <el-form  label-width="86px">              
	                <el-row :gutter="20">
		                <el-col span="8">
			                    <el-form-item label="导入状态:">
			                        <el-select v-model="impSts" placeholder="请选择">
			                            <el-option v-for="item in impOptions" :key="item.code" :label="item.code_desc" :value="item.code">
			                            </el-option>
			                        </el-select>
			                    </el-form-item> 
		                 </el-col>
	                	<el-col span="8">
		                    <el-form-item label="导入时间:" class="media-mr0">   
		                     	<el-date-picker v-model="impDate" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期">
		                        </el-date-picker>
		                    </el-form-item>
	                    </el-col>
	                    
	                    <el-form-item label="上传：" style="display:none;"> <!--  -->
					 		   <el-upload class="avatar-uploader el-upload--text" 
							     :action="uploadUrl"
							    ref="upload"	   
							    :show-file-list="false" 
							    :on-success="handleFileSuccess" 
							    :on-error="handleFileError"
							    :before-upload="beforeUploadFile" 
							    :on-progress="uploadFileProcess"
							    :data="data">
							    	<el-button size="small" type="primary">点击上传</el-button>
							    </el-upload>
					 	</el-form-item>  
					 	<el-progress v-if="fileFlag" style="position: absolute;left:150px;top:10px;"  :percentage="fileUploadPercent"></el-progress>
	                </el-row>      
                
               	</el-form>
                </el-card> 
                <el-row :gutter="20">       
                           
                    <el-col span="24">
                        <div class="grid-content">
                        	 <!--  -->
                            <el-row class="tr mb3">
                            	<el-button type="primary" @click="load">导入</el-button>
                            </el-row>
                            
					 		
                            <el-table id="impTable" ref="impTable" :data="impData" border style="width: 100%;" class="w-tablesub">
                               	<el-table-column  prop="import_id" label="编号" width="150">
								</el-table-column>
                				
                               	<el-table-column  label="文件名" width="300" class="w-textsub">
				                    <template slot-scope="scope">
				                        <el-popover trigger="hover" placement="top-start">
				                            <p class="w-tablepop">{{ shorten(scope.row.file_name) }}</p>
				                            <div slot="reference" >
				                               	{{ scope.row.file_name }}
				      		                </div>		                           
				                        </el-popover>
				                    </template>
                				</el-table-column>
                				
                                <el-table-column prop="import_date" label="导入时间" width="300">
                                </el-table-column>
                                <el-table-column prop="import_status_name" label="状态" width="300" >
                                </el-table-column>                               
                                <el-table-column label="操作">
                                     <template slot-scope="scope">
                                     	<span v-if="scope.row.msg_status!='msg_status_1'" style="font-size:18px">
                                     		<i class="el-icon-download" title="下载" @click="download(scope.row)" style="cursor:pointer;"></i>
                                     		<i class="el-icon-search" title="查看" @click="view(scope.row)" style="cursor:pointer;"></i>
                                     		<i v-if="scope.row.import_status!='import_status_4'" class="el-icon-upload" title="迁移数据" @click="transfer(scope.row)" style="cursor:pointer;"></i>
                                     		<i v-if="scope.row.import_status!='import_status_4'" class="el-icon-success" title="数据验证" @click="check(scope.row)" style="cursor:pointer;"></i>
                                     		<i v-if="scope.row.import_status!='import_status_4'" class="el-icon-refresh" title="重新导入" @click="reload(scope.row)" style="cursor:pointer;"></i>
                                     		<i class="el-icon-delete" title="删除" @click="del(scope.row)" style="cursor:pointer;"></i>
                                     	</span>                                     		
                                     </template>
                                </el-table-column>   
                               
                            </el-table> 
                            <div class="block mt10">
                                <el-pagination @size-change="handleSizeChange"
                                    @current-change="handleCurrentChange"
                                    :current-page="currentPageNbr" :page-sizes="pageSizes"
                                    :page-size="pageSize" class="w-tc"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="totalRecords"> </el-pagination>
                            </div>
                             
                        </div>
                    </el-col>
                   
                </el-row>
            </div>
        </div>    
        
    </div>
<script>
    _import("../../plugin/vue/js/after.js");
</script>       
<script>
     _import("../../plugin/vue/js/editor/js/vue2-editor/vue2editor.js");
</script>
<script>
    _import("js/importmainlist.js");
</script>
</body>
</html>